package com.ls.util;

import org.apache.shiro.crypto.hash.SimpleHash;
import org.apache.shiro.util.ByteSource;

/**
 * <p></p>
 * Created by zhezhiyong@163.com on 2017/2/18.
 */
public class CommonUtils {

    /**
     * 获取shiro加密，进行MD5 2次加密
     * @param password
     * @param salt
     * @return
     */
    public static String getEncryptPsw(String password, String salt) {
        return new SimpleHash("md5", password, ByteSource.Util.bytes(salt), 2).toHex();
    }

}
